import { Children, lazy } from "react";
import { FriendsO, HomeO, Search, SettingO } from '@react-vant/icons'
const Home = lazy(() => import("../page/Home/index"));
const Login = lazy(() => import("../page/Login/index"));
const Mainlayout = lazy(() => import("../page/Mainlayout/index"));
const Index = lazy(() => import("../page/Index/index"));
const Message = lazy(() => import("../page/Message/index"));
const My = lazy(() => import("../page/My/index"));
export const Zi = [
  {
    path: "/",
    element: <Home></Home>,
    title: "首页",
     icon:<FriendsO />
  },
  {
    path: "/index",
    element: <Index></Index>,
    title: "搜搜",
     icon:<HomeO />
  },
  {
    path: "/message",
    element: <Message></Message>,
    title: "信息",
     icon:<Search />
  },
  {
    path: "/my",
    element: <My></My>,
    title: "我的",
    icon:<SettingO />
  },
];

const routes = [
  {
    path: "/login",
    element: <Login></Login>,
  },

  {
    path: "/",
    element: <Mainlayout></Mainlayout>,
    children: Zi,
  },
];

export default routes;
